; (function (document, window) {
  function setHtmlFontSize() {
    let designWidth = 750, //设计稿宽度
      html = document.documentElement,
      deviceWidth = html.clientWidth,//用户屏幕宽度
      scale = deviceWidth / designWidth * 100;//比例 * 10
    html.style.fontSize = scale + 'px'; //设置根元素的字体大小
    console.log(scale);
  }
  setHtmlFontSize();
  window.onresize = setHtmlFontSize;
})(document, window);